package comparators;

import java.util.Comparator;

import model.GenericScenarie;

public class GenericScenarieComparator implements Comparator<GenericScenarie> {

	@Override
	public int compare(GenericScenarie o1, GenericScenarie o2) {

		if (o1.getAttribute().equals(o2.getAttribute())) {
			return o1.getScenarie().compareTo(o2.getScenarie());
		}
		return o1.getAttribute().toString().compareTo(o2.getAttribute().toString());
	}

}
